package us.wili.dev.client.service;

import cn.binarywang.wx.miniapp.bean.WxMaJscode2SessionResult;
import us.wili.dev.client.model.req.MiniGetUserInfoReq;
import us.wili.dev.client.model.rsp.AboutMeRsp;
import us.wili.dev.client.model.rsp.MiniUserInfoRsp;
import us.wili.dev.jwt.model.ChannelEnum;
import us.wili.dev.model.entity.User;
import us.wili.dev.service.BaseUserService;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

public interface ClientUserService extends BaseUserService {
    User findUser(Long id);

    AboutMeRsp AboutMe(Long id);

    User findUserByname(String phone);

    User registe(WxMaJscode2SessionResult sessionInfo);

    /**
     * 隐藏用户不能传递给前端的信息,例如用户密码
     */
    User couvertSecrecyMsg(User user);

    User isPhoneAlreadyBinding(WxMaJscode2SessionResult sessionInfo);

    WxMaJscode2SessionResult getOpenidBycode(MiniGetUserInfoReq miniUserInfoReq);

    MiniUserInfoRsp setuser(WxMaJscode2SessionResult sessionInfo,String token,User user);

    public String setJwtToken(User user,ChannelEnum channelEnum,HttpServletRequest request,HttpServletResponse response);
}
